<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NVTX C++ API Reference: nvtx3::v1::range_handle Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">NVTX C++ API Reference<span id="projectnumber">&#160;1.0</span>
   </div>
   <div id="projectbrief">C++ convenience wrappers for NVTX v3 C API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>nvtx3</b></li><li class="navelem"><b>v1</b></li><li class="navelem"><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html">range_handle</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="structnvtx3_1_1v1_1_1range__handle-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">nvtx3::v1::range_handle Struct Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Handle used for correlating explicit range start and end events.  
 <a href="structnvtx3_1_1v1_1_1range__handle.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a77be25af5cf21fde96c18bf30727f109"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#a77be25af5cf21fde96c18bf30727f109">value_type</a> = nvtxRangeId_t</td></tr>
<tr class="memdesc:a77be25af5cf21fde96c18bf30727f109"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type used for the handle's value.  <a href="structnvtx3_1_1v1_1_1range__handle.html#a77be25af5cf21fde96c18bf30727f109">More...</a><br /></td></tr>
<tr class="separator:a77be25af5cf21fde96c18bf30727f109"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a268da1820c8b8c63210123f0eca23b4d"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#a268da1820c8b8c63210123f0eca23b4d">range_handle</a> (<a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#a77be25af5cf21fde96c18bf30727f109">value_type</a> id) noexcept</td></tr>
<tr class="memdesc:a268da1820c8b8c63210123f0eca23b4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html" title="Handle used for correlating explicit range start and end events.">range_handle</a></code> from the given id.  <a href="structnvtx3_1_1v1_1_1range__handle.html#a268da1820c8b8c63210123f0eca23b4d">More...</a><br /></td></tr>
<tr class="separator:a268da1820c8b8c63210123f0eca23b4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d0f33132aa6782d681656040dd6ce7f"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#a5d0f33132aa6782d681656040dd6ce7f">range_handle</a> () noexcept=default</td></tr>
<tr class="memdesc:a5d0f33132aa6782d681656040dd6ce7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a null range handle.  <a href="structnvtx3_1_1v1_1_1range__handle.html#a5d0f33132aa6782d681656040dd6ce7f">More...</a><br /></td></tr>
<tr class="separator:a5d0f33132aa6782d681656040dd6ce7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab622758fb9654b36c018b0c9aa91679a"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#ab622758fb9654b36c018b0c9aa91679a">operator bool</a> () const noexcept</td></tr>
<tr class="memdesc:ab622758fb9654b36c018b0c9aa91679a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether this handle is null.  <a href="structnvtx3_1_1v1_1_1range__handle.html#ab622758fb9654b36c018b0c9aa91679a">More...</a><br /></td></tr>
<tr class="separator:ab622758fb9654b36c018b0c9aa91679a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acaef1aa87e8c7ce936b0e93040b8ad3a"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#acaef1aa87e8c7ce936b0e93040b8ad3a">range_handle</a> (std::nullptr_t) noexcept</td></tr>
<tr class="memdesc:acaef1aa87e8c7ce936b0e93040b8ad3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implicit conversion from <code>nullptr</code> constructs a null handle.  <a href="structnvtx3_1_1v1_1_1range__handle.html#acaef1aa87e8c7ce936b0e93040b8ad3a">More...</a><br /></td></tr>
<tr class="separator:acaef1aa87e8c7ce936b0e93040b8ad3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3919493cff16228eed36c9a3c3f84de6"><td class="memItemLeft" align="right" valign="top">constexpr <a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#a77be25af5cf21fde96c18bf30727f109">value_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#a3919493cff16228eed36c9a3c3f84de6">get_value</a> () const noexcept</td></tr>
<tr class="memdesc:a3919493cff16228eed36c9a3c3f84de6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <code><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html" title="Handle used for correlating explicit range start and end events.">range_handle</a></code>'s value.  <a href="structnvtx3_1_1v1_1_1range__handle.html#a3919493cff16228eed36c9a3c3f84de6">More...</a><br /></td></tr>
<tr class="separator:a3919493cff16228eed36c9a3c3f84de6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Handle used for correlating explicit range start and end events. </p>
<p >A handle is "null" if it does not correspond to any range. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l02199">2199</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a77be25af5cf21fde96c18bf30727f109" name="a77be25af5cf21fde96c18bf30727f109"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77be25af5cf21fde96c18bf30727f109">&#9670;&#160;</a></span>value_type</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#a77be25af5cf21fde96c18bf30727f109">nvtx3::v1::range_handle::value_type</a> =  nvtxRangeId_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Type used for the handle's value. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l02201">2201</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a268da1820c8b8c63210123f0eca23b4d" name="a268da1820c8b8c63210123f0eca23b4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a268da1820c8b8c63210123f0eca23b4d">&#9670;&#160;</a></span>range_handle() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtx3::v1::range_handle::range_handle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#a77be25af5cf21fde96c18bf30727f109">value_type</a>&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html" title="Handle used for correlating explicit range start and end events.">range_handle</a></code> from the given id. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l02208">2208</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="a5d0f33132aa6782d681656040dd6ce7f" name="a5d0f33132aa6782d681656040dd6ce7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d0f33132aa6782d681656040dd6ce7f">&#9670;&#160;</a></span>range_handle() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtx3::v1::range_handle::range_handle </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">constexpr</span><span class="mlabel">default</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs a null range handle. </p>
<p >A null <a class="el" href="structnvtx3_1_1v1_1_1range__handle.html" title="Handle used for correlating explicit range start and end events.">range_handle</a> corresponds to no range. Calling <code>end_range</code> on a null handle is undefined behavior when a tool is active. </p>

</div>
</div>
<a id="acaef1aa87e8c7ce936b0e93040b8ad3a" name="acaef1aa87e8c7ce936b0e93040b8ad3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acaef1aa87e8c7ce936b0e93040b8ad3a">&#9670;&#160;</a></span>range_handle() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtx3::v1::range_handle::range_handle </td>
          <td>(</td>
          <td class="paramtype">std::nullptr_t&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implicit conversion from <code>nullptr</code> constructs a null handle. </p>
<p >Satisfies the "NullablePointer" requirement to make <code><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html" title="Handle used for correlating explicit range start and end events.">range_handle</a></code> comparable with <code>nullptr</code>. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l02238">2238</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a3919493cff16228eed36c9a3c3f84de6" name="a3919493cff16228eed36c9a3c3f84de6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3919493cff16228eed36c9a3c3f84de6">&#9670;&#160;</a></span>get_value()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr <a class="el" href="structnvtx3_1_1v1_1_1range__handle.html#a77be25af5cf21fde96c18bf30727f109">value_type</a> nvtx3::v1::range_handle::get_value </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the <code><a class="el" href="structnvtx3_1_1v1_1_1range__handle.html" title="Handle used for correlating explicit range start and end events.">range_handle</a></code>'s value. </p>
<dl class="section return"><dt>Returns</dt><dd>value_type The handle's value </dd></dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l02245">2245</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="ab622758fb9654b36c018b0c9aa91679a" name="ab622758fb9654b36c018b0c9aa91679a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab622758fb9654b36c018b0c9aa91679a">&#9670;&#160;</a></span>operator bool()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtx3::v1::range_handle::operator bool </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Checks whether this handle is null. </p>
<p >Provides contextual conversion to <code>bool</code>.</p>
<div class="fragment"><div class="line"><a class="code hl_struct" href="structnvtx3_1_1v1_1_1range__handle.html">range_handle</a> handle{};</div>
<div class="line"><span class="keywordflow">if</span> (handle) {...}</div>
<div class="ttc" id="astructnvtx3_1_1v1_1_1range__handle_html"><div class="ttname"><a href="structnvtx3_1_1v1_1_1range__handle.html">nvtx3::v1::range_handle</a></div><div class="ttdoc">Handle used for correlating explicit range start and end events.</div><div class="ttdef"><b>Definition:</b> <a href="nvtx3_8hpp_source.html#l02199">nvtx3.hpp:2199</a></div></div>
</div><!-- fragment --> 
<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l02230">2230</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
